<?php !defined('DYHB_PATH') && exit; /* DoYouHaoBaby Framework 模板缓存文件 生成时间：2011-05-28 11:35:41  */ ?>
<?php $this->includeChildTemplate( "".APP_PATH."/Tpl/Default/public_header.html" ,"" ,"" ,"" )  ;?>

<script type="text/javascript">
<!--
function add(){
	Dyhb.AjaxSubmit('groupAdd','<?php echo( G::U('group/insert') );?>','',complete);
}
function update(){
	Dyhb.AjaxSubmit('groupAdd','<?php echo( G::U('group/update') );?>');
}
function complete(data,status){
    if(status==1){

        $('#id').val(data.id);
    }
}

-->
</script>

   <!-- 标题  -->
   <div class="title"><?php if(empty( $nId )) :?><?php print G::L( "添加角色分组", null, null ) ; ?><?php else: ?><?php print G::L( "编辑角色分组", null, null ) ; ?><?php endif; ?> ( <a href="<?php echo( G::U('group/index') );?>"><?php print G::L( "返回角色分组列表", null, null ) ; ?></a> )</div>

  <!-- 正文 -->
  <div id="content" class="content">
      <form action="<?php if(empty( $nId )) :?><?php echo( G::U('role/insert') );?><?php else: ?><?php echo( G::U('role/update') );?><?php endif; ?>" method="post" id="groupAdd">
      <table class="form-table full">
          <tr>
            <th valign="top"><label for="group_sort"><?php print G::L( "序号", null, null ) ; ?>：</label></th>
            <td><input type="text" name="group_sort" id="group_sort" class="field" size="40"  value="<?php if(isset( $arrValue ) && !empty( $arrValue['group_sort'] )) :?><?php echo( $arrValue['group_sort'] ); ?><?php else: ?>0<?php endif; ?>"/>
            <div class="description"><?php print G::L( "节点组序号，用于节点组排序", null, null ) ; ?></div></td>
          </tr>
          <tr>
            <th valign="top"><label for="group_name"><?php print G::L( "组名", null, null ) ; ?>：</label></th>
            <td><input type="text" name="group_name" id="group_name" class="field" size="40" value="<?php if(isset( $arrValue )) :?><?php echo( $arrValue['group_name'] ); ?><?php endif; ?>"/>
            <div class="description"><?php print G::L( "节点组的名字", null, null ) ; ?></div></td>
          </tr>
          <tr>
            <th valign="top"><label for="group_title"><?php print G::L( "显示名", null, null ) ; ?>：</label></th>
            <td><input type="text" name="group_title" id="group_title" class="field" size="40"  value="<?php if(isset( $arrValue )) :?><?php echo( $arrValue['group_title'] ); ?><?php endif; ?>"/>
            <div class="description"><?php print G::L( "节点组的别名", null, null ) ; ?></div></td>
          </tr>
          <tr>
            <th valign="top"><label for="group_status"><?php print G::L( "状态", null, null ) ; ?>：</label></th>
            <td><SELECT class="field"  name="group_status">
	             <option value="1" <?php if(isset( $arrValue ) && $arrValue['group_status']==1) :?>selected<?php endif; ?>><?php print G::L( "启用", null, null ) ; ?></option>
	             <option value="0" <?php if(!isset( $arrValue ) || ( isset( $arrValue ) && $arrValue['group_status']==0 ) ) :?>selected<?php endif; ?>><?php print G::L( "禁用", null, null ) ; ?></option>
	           </SELECT>
			   <div class="description"><?php print G::L( "节点组的状态，启用后才能够使用", null, null ) ; ?></div>
            </td>
          </tr>
          <tr>
            <th valign="top"><label for="group_show"><?php print G::L( "显示", null, null ) ; ?>：</label></th>
            <td><SELECT class="field"  name="group_show">
	             <option value="1" <?php if(isset( $arrValue ) && $arrValue['group_show']==1) :?>selected<?php endif; ?>><?php print G::L( "显示", null, null ) ; ?></option>
	             <option value="0" <?php if(!isset( $arrValue ) || ( isset( $arrValue ) && $arrValue['group_show']==0 ) ) :?>selected<?php endif; ?>><?php print G::L( "关闭", null, null ) ; ?></option>
	           </SELECT>
	           <div class="description"><?php print G::L( "节点组是否显示", null, null ) ; ?></div>
            </td>
          </tr>

          </table>
          <p class="center"><input type="hidden" name="ajax" value="1">
            <input type="hidden" name="id" id="id" value="<?php if(!empty( $nId )) :?><?php echo( $nId ); ?><?php endif; ?>"/>
            <input type="button" onclick="<?php if(!empty( $nId )) :?>update()<?php else: ?>add()<?php endif; ?>"  class="button" value="<?php if(!empty( $nId )) :?>  <?php print G::L( "更  新", null, null ) ; ?><?php else: ?>  <?php print G::L( "发  布", null, null ) ; ?><?php endif; ?>  " />
            <input type="reset" class="button" value="  <?php print G::L( "重  置", null, null ) ; ?>  " />
        </p>
        </form>

   </div>
   <!-- end content -->

<?php $this->includeChildTemplate( "".APP_PATH."/Tpl/Default/public_footer.html" ,"" ,"" ,"" )  ;?>